import http from '@/axios';

//统一接口信息
//所有的请求全部统一在这里配置
//get请求示例,带参数
export const getUserInfo = (param) => http.get('url',param.id);
//get请求示例，不带参数
export const getUserList = () => http.get('url');
//post请求示例 带参数
export const validateLoginApi = (data) => http.post('url',data);
//post请求示例 不带参数
export const userlogout = () => http.post('url');
//建议使用的方法
//将post对象封装在一个form对象里，直接将对象作为参数传入
export const doMothed = (form) => http.post('url',form);


/**
 * 用户管理模块
 */
//用户登录
export const loginUser = (form) => http.post('/user/validateUser', form);
//头像上传
export const uploadAvatar = (form) => http.postFile('/file/uploadAvatar', form);

/**
 * 科室管理模块
 */
//添加科室
export const addDepartment = (form) => http.post('/department/addDepartment', form);
//编辑科室
export const editDepartment = (form) => http.post('/department/editDepartment', form);
//根据搜索条件查询科室分页数据
export const getDepartmentPager = (form) => http.post('/department/getDepartmentPager', form);
//获取科室列表数据
export const getDepartmentList = () => http.get('/department/getDepartmentList');
// 获取科室类型列表数据
export const getDepartmentTypeList = () => http.get('/department/getDepartmentTypeList');

/**
 * 医生管理模块
 */
//添加医生
export const addDoctor = (form) => http.post('/doctor/addDoctor', form);
//编辑医生
export const editDoctor = (form) => http.post('/doctor/editDoctor', form);
//获取医师的职称信息列表
export const getDoctorProfessionList = () => http.get('/doctor/getDoctorProfessionList');
//根据搜索条件查询医生分页数据
export const getDoctorPagerDataBySearch = (form) => http.post('/doctor/getDoctorPagerDataBySearch', form);
//获取医生列表数据
export const getDoctorList = () => http.get('/doctor/getDoctorList');

/**
 * 护士管理模块
 */
//添加护士
export const addNurse = (form) => http.post('/nurse/addNurse', form);
//编辑护士
export const editNurse = (form) => http.post('/nurse/editNurse', form);
//获取护士的职称信息列表
export const getNurseProfessionList = () => http.get('/nurse/getNurseProfessionList');
//根据搜索条件查询护士分页数据
export const getNursePagerDataBySearch = (form) => http.post('/nurse/getNursePagerDataBySearch', form);
//获取护士列表数据
export const getNurseList = () => http.get('/nurse/getNurseList');


/**
 * 药剂师管理模块
 */
//添加药剂师
export const addPharmacist = (form) => http.post('/pharmacist/addPharmacist', form);
//编辑药剂师
export const editPharmacist = (form) => http.post('/pharmacist/editPharmacist', form);
//获取药剂师的职称信息列表
export const getPharmacistProfessionalList = () => http.get('/pharmacist/getPharmacistProfessionList');
//根据搜索条件查询药剂师分页数据
export const getPharmacistPagerDataBySearch = (form) => http.post('/pharmacist/getPharmacistPagerDataBySearch', form);
// 获取药剂师列表数据
export const getPharmacistList = () => http.get('/pharmacist/getPharmacistList');

/** 
 * 财务人员相关接口
 */
//添加财务人员
export const addFinanceStaff = (form) => http.post('/finance/addFinance', form);
//编辑财务人员
export const editFinanceStaff = (form) => http.post('/finance/editFinance', form);
//获取财务人员职称列表
export const getFinanceProfessionalList = () => http.get('/finance/getFinanceProfessionList');
//根据搜索条件查询财务人员分页数据
export const getFinanceStaffPagerDataBySearch = (form) => http.post('/finance/getFinancePagerDataBySearch', form);
// 获取财务人员列表数据
export const getFinanceStaffList = () => http.get('/finance/getFinanceList');


/**
 * 行政管理人员相关接口
 */
// 添加行政人员
export const addManager = (form) => http.post('/adminStaff/addManager',form);
// 编辑行政人员
export const editManager = (form) => http.post('/adminStaff/editManager',form);
// 获取行政管理人员职称列表
export const getAdminStaffProfessionalList = () => http.get('/adminStaff/getAdminStaffProfessionalList');
// 获取行政管理人员分页数据
export const getAdminStaffPagerDataBySearch = (form) => http.post('/adminStaff/getAdminStaffPagerDataBySearch',form);

/**
 * 费用配置模块
 */
//费用类型列表
export const getFeeCateList = () => http.get('/fee/getFeeCateList');
// 添加费用项
export const addFeeItem = (form) => http.post('/fee/addFeeItem', form);
// 编辑费用项
export const editFeeItem = (form) => http.post('/fee/editFeeItem', form);
// 根据搜索条件查询费用项分页数据
export const getFeeItemPagerDataBySearch = (form) => http.post('/fee/getFeeItemPagerDataBySearch', form);
// 获取费用项统计数据
export const statsFeeItemCount = () => http.get('/fee/statsFeeItemCount');
// 获取费用类型列表数据
export const getFeeItemList = () => http.get('/fee/getFeeItemList');

/**
 * 排班管理模块
 */
// 人员类型定义表信息
export const getStaffTypeList = () => http.get('/schedule/getStaffTypeList');

// 班次时间定义表信息
export const getTimeSlotList = () => http.get('/schedule/getTimeSlotList');

// 排班类型定义表信息
export const getScheduleTypeList = () => http.get('/schedule/getScheduleTypeList');

// 添加排班模板
export const addScheduleTemplate = (form) => http.post('/schedule/addScheduleTemplate', form);
// 编辑排班模板
export const editScheduleTemplate = (form) => http.post('/schedule/editScheduleTemplate', form);
// 根据搜索条件查询排班模板分页数据
export const getScheduleTemplatePagerDataBySearch = (form) => http.post('/schedule/getScheduleTemplatePagerDataBySearch', form);
// 获取排班模板列表数据
export const getScheduleTemplateList = () => http.get('/schedule/getScheduleTemplateList');

// 根据AI工作流分析的关键词查询排班模板数据
export const queryScheduleTemplateByAI = (form) => http.post('/schedule/queryScheduleTemplateByAI',form);

// 提交排班实例数据
export const generateScheduleInstances = (form) => http.post('/schedule/generateScheduleInstances', form);
// 根据搜索条件查询排班实例数据-月视图-周视图-日视图
export const getScheduleInstanceDataBySearch = (form) => http.post('/schedule/getScheduleInstanceDataBySearch', form);
// 获取指定日期的排班实例数据
export const getScheduleInstanceListByDate = (form) => http.post('/schedule/getScheduleInstanceListByDate', form);

/**
 * 自助机挂号门诊
 */
// 获取当天的排班门诊和医生信息
export const getScheduleInstancesDataByCurrentDate = () => http.get('/schedule/getScheduleInstancesDataByCurrentDate');
// 根据科室ID和日期查询医生排班信息
export const selectDoctorByDepartmentAndDate = (form) => http.post('/schedule/selectDoctorByDepartmentAndDate',form);
// 根据医生ID查询医生详细信息
export const selectDoctorDetailById = (form) => http.post('/schedule/selectDoctorDetailById',form);
// 提交挂号信息（未缴费）
export const addRegistration = (form) => http.post('/registration/addRegistration',form);
// 提交完成缴费
export const completePayment = (form) => http.post('/registration/completePayment',form);

/**
 * 数据统计相关
 */
// 获取首页统计数据
export const getHomeStatsData = () => http.get('/home/getHomeStatsData');


/**
 * 模拟医保账户请求数据
 * 
 */
//根据医保号获取二维码数据
export const getQRCodeData = (form) => http.post('/medical/queryCardNumber',form);
//根据二维码获取患者基础信息
export const queryQrCode = (form) => http.post('/medical/queryQrCode',form);

/**
 * 收费管理请求数据
 */
//收费分页数据
export const getPaymentPagerDataBySearch = (form) => http.post('/billing/getPaymentPagerDataBySearch', form);
//根据paymentId查询费用详情
export const getPaymentDetailById = (form) => http.post('/billing/getPaymentDetailById',form);

